<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>商品<%= books._id ? '修改': '添加'%>页面</h2>
    <form action="/book/<%= books._id ? 'update': 'add'%>" method="post">
        <%
            if(books._id) {
        %>
                <input type="hidden" name="_id" value="<%= books._id%>">
        <%
            }
        %>
        姓名： <input type="text" name="name" value="<%= books.name%>"><br>
        作者： <input type="text" name="author" value="<%= books.author%>"><br>
        价格： <input type="text" name="price" value="<%= books.price%>"><br>
        <button>提交</button>
    </form>
</body>
</html>